/**
 * FileName:         TpGategoriesController.java
 * @Description:     TODO
 * @author:            zl
 * @version            V1.0
 * Createdate:      2019年1月11日     上午11:41:19
 * Copyright:       
 * Company           CY.
 * All rights Reserved, Designed By crane-yuan

 * Modification  History:
 * Date         Author        Version        Discription
 * ---------------------------------------------------------------------------
 * 2019年1月11日     crane-yuan       1.0             1.0

 * Why & What is modified:

 */
package com.Brewing.springboot.controller.TpGategories;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.Brewing.springboot.common.BrewingJSONResult;
import com.Brewing.springboot.entity.TpCategories.TpCategories;
import com.Brewing.springboot.service.TpGategories.GategoriesService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Company: </p>
 * @author  庄磊
 * @date	2019年1月11日 上午11:41:19 
 * @version 1.0
 */
@RestController
@Api(value="Gategories-Api",tags= {"Gategories-Api"})
@RequestMapping("/gategories")
public class TpGategoriesController {
	
	@Autowired
	private GategoriesService gategoriesService;
	
	@ApiOperation(value="获取分类列表", notes="获取分类列表的接口")
	@PostMapping("/list")
	public BrewingJSONResult list() {
		List<TpCategories> list = gategoriesService.findlist();
		return BrewingJSONResult.ok(list);
	}
}
